<template>
    <div>
        <Header :tap='title'/>
        <Lunbo />
        <div class="pic">
            点赞
            <img src="../../images/cont_icon2_sel.png" alt="" v-if="flag" @click="like()">
            <img src="../../images/cont_icon2_unsel.png" alt="" v-else @click="like()">
            <p>{{$store.state.count}}</p>
            <button @click="$store.commit('jia')">+</button>
            <button @click="$store.commit('jian')">-</button>
        </div>
        <Footer />
    </div>
</template>
<script>
import Header from '../commons/header.vue'
import Footer from '../commons/footer.vue'
import Lunbo from '../commons/lunbo.vue'
export default {
    data(){
        return{
            title:'会员',
            flag:false
        }
    },
    components:{
        Header,
        Footer,
        Lunbo
    },
    methods:{
        like(){
            this.flag = !this.flag
        }
    }
}
</script>
<style scoped>

</style>


